package com.example.mychat.service.impl;

import com.example.mychat.dao.UserDao;
import com.example.mychat.entity.User;
import com.example.mychat.service.UserService;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired(required = false)
    private UserDao userDao;
    @Override
    public List<User> findAllUser() {
        return userDao.findAllUser();
    }

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public int updUser(User user) {
        return userDao.updUser(user);
    }

    @Override
    public int delUser(Integer id) {
        return userDao.delUser(id);
    }
}
